Skip to content

fix(builtins): honor jq -j/--join-output flag to suppress trailing newline#975

Merged
chaliy merged 1 commit intomainfrom
fix/issue-951-jq-join-output
Apr 2, 2026
Merged

fix(builtins): honor jq -j/--join-output flag to suppress trailing newline#975
chaliy merged 1 commit intomainfrom
fix/issue-951-jq-join-output

Conversation

@chaliy
Copy link
Copy Markdown
Contributor

@chaliy chaliy commented Apr 2, 2026

Summary

  • Fix jq -j ignoring the join-output flag and always adding trailing newline
  • The flag was parsed but not checked when formatting output

Test plan

  • New spec tests: jq_join_output_flag, jq_join_output_sentinel
  • No regressions in existing jq/spec tests
  • clippy + fmt clean

Closes #951

…wline

The -j flag was correctly suppressing newlines between outputs but
the trailing-newline enforcement at the end of output was not checking
the join_output flag. Check join_output and skip the trailing newline
when set.

Closes #951
@chaliy chaliy merged commit ae260f9 into main Apr 2, 2026
27 checks passed
@chaliy chaliy deleted the fix/issue-951-jq-join-output branch April 2, 2026 06:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Builtin jq -j ignores join flag and adds trailing newline

1 participant